from app import db
from datetime import datetime

class EcologicalIndicator(db.Model):
    __tablename__ = 'ecological_indicators'
    
    id = db.Column(db.Integer, primary_key=True)
    marine_area_id = db.Column(db.Integer, db.ForeignKey('marine_areas.id'))
    water_quality = db.Column(db.DECIMAL(5, 2))
    biodiversity = db.Column(db.DECIMAL(5, 2))
    pollution_index = db.Column(db.DECIMAL(5, 2))
    resource_reserve = db.Column(db.DECIMAL(5, 2))
    environmental_capacity = db.Column(db.DECIMAL(5, 2))
    measurement_date = db.Column(db.Date, nullable=False)
    created_at = db.Column(db.DateTime, default=datetime.utcnow) 